package stw.brassdawn.entity;

import stw.brassdawn.resource.TextureLibrary;

import com.badlogic.gdx.graphics.Texture;

public abstract class Entity {
	protected String myName = "";
	protected String myDescription = "";
	protected int myUnitID = -1;
	protected int myMaxLife = -1;
	protected int myCurrentLife = -1;
	protected int myMovementRange = -1;
	protected MovementType myMovementType;
	protected EntityType myType;
	protected static int ourGID = 0;
	protected String myTextureName = "";
	private Texture myTexture = null;
	
	public Texture getTexture( ) {
		return myTexture;
	}
	
	public void setTexture( String texture ) {
		myTextureName = texture;
		myTexture = TextureLibrary.getTextLibrary().getTexture(myTextureName);
	}
	
	public int getCurrentLife( ) {
		return myCurrentLife;
	}

	public void setCurrentLife( int life ) {
		myCurrentLife = life;
	}
	
	public String getDescription() {
		return myDescription;
	}
	
	public void setDescription( String description ) {
		myDescription = description;
	}
	
	public int getMaxLife( ) {
		return myMaxLife;
	}
	
	public void setMaxLife( int life ) {
		myMaxLife = life;
	}
	
	public int getMovementRange( ) {
		return myMovementRange;
	}
	
	public void setMovementRange( int range ) {
		myMovementRange = range;
	}
	
	public MovementType getMovementType( ) {
		return myMovementType;
	}
	
	public void setMovementType( MovementType type ) {
		myMovementType = type;
	}
	
	public String getName() {
		return myName;
	}
	
	public void setName( String name ) {
		myName = name;
	}
	
	public int getUnitID( ) {
		return myUnitID;
	}
	
	public void setUnitID( int unitID ) {
		myUnitID = unitID;
	}
	
	public EntityType getType( ) {
		return myType;
	}
	
	public void setType( EntityType type ) {
		myType = type;
	}
	
	public String toString() {
		StringBuffer sb = new StringBuffer();
		sb.append( getName() );
		sb.append("\n");
		sb.append( getDescription() );
		return "";
	}
}

enum MovementType {
	SHALLOW_WATER,
	DEEP_WATER,
	HIGH_ALTITUDE,
	LOW_ALTITUDE,
	FOOT,
	WHEELED,
	TREAD,
	RAIL,
	STATIONARY;
}

enum EntityType {
	NAVAL,
	AIRCRAFT,
	GROUND,
	STRUCTURE;
}
